package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeInquiryoccupationsMapper;
import com.dime.physical.domain.DimeInquiryoccupations;
import com.dime.physical.service.IDimeInquiryoccupationsService;

/**
 * 问诊职业史Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-07
 */
@Service
public class DimeInquiryoccupationsServiceImpl implements IDimeInquiryoccupationsService 
{
    @Autowired
    private DimeInquiryoccupationsMapper dimeInquiryoccupationsMapper;

    /**
     * 查询问诊职业史
     * 
     * @param id 问诊职业史主键
     * @return 问诊职业史
     */
    @Override
    public DimeInquiryoccupations selectDimeInquiryoccupationsById(String id)
    {
        return dimeInquiryoccupationsMapper.selectDimeInquiryoccupationsById(id);
    }

    /**
     * 查询问诊职业史列表
     * 
     * @param dimeInquiryoccupations 问诊职业史
     * @return 问诊职业史
     */
    @Override
    public List<DimeInquiryoccupations> selectDimeInquiryoccupationsList(DimeInquiryoccupations dimeInquiryoccupations)
    {
        return dimeInquiryoccupationsMapper.selectDimeInquiryoccupationsList(dimeInquiryoccupations);
    }

    /**
     * 新增问诊职业史
     * 
     * @param dimeInquiryoccupations 问诊职业史
     * @return 结果
     */
    @Override
    public int insertDimeInquiryoccupations(DimeInquiryoccupations dimeInquiryoccupations)
    {
        dimeInquiryoccupations.setCreateTime(DateUtils.getNowDate());
        return dimeInquiryoccupationsMapper.insertDimeInquiryoccupations(dimeInquiryoccupations);
    }

    /**
     * 修改问诊职业史
     * 
     * @param dimeInquiryoccupations 问诊职业史
     * @return 结果
     */
    @Override
    public int updateDimeInquiryoccupations(DimeInquiryoccupations dimeInquiryoccupations)
    {
        dimeInquiryoccupations.setUpdateTime(DateUtils.getNowDate());
        return dimeInquiryoccupationsMapper.updateDimeInquiryoccupations(dimeInquiryoccupations);
    }

    /**
     * 批量删除问诊职业史
     * 
     * @param ids 需要删除的问诊职业史主键
     * @return 结果
     */
    @Override
    public int deleteDimeInquiryoccupationsByIds(String[] ids)
    {
        return dimeInquiryoccupationsMapper.deleteDimeInquiryoccupationsByIds(ids);
    }

    /**
     * 删除问诊职业史信息
     * 
     * @param id 问诊职业史主键
     * @return 结果
     */
    @Override
    public int deleteDimeInquiryoccupationsById(String id)
    {
        return dimeInquiryoccupationsMapper.deleteDimeInquiryoccupationsById(id);
    }
}
